Skip to content

fix(drivers): map UI dump text into ViewNode.text for locators#43

Open
emor wants to merge 3 commits intomobile-next:mainfrom
emor:fix/viewnode-text-from-ui-dump
Open

fix(drivers): map UI dump text into ViewNode.text for locators#43
emor wants to merge 3 commits intomobile-next:mainfrom
emor:fix/viewnode-text-from-ui-dump

Conversation

@emor
Copy link
Copy Markdown
Contributor

@emor emor commented Apr 23, 2026

  1. Mobilecli and Mobile Use RPC elements can carry visible copy in text
    and accessibility in label. ViewNode.text was only set from label,
    so getByText / getByRole name matching missed Android TextView-style
    nodes with empty labels. Prefer el.text then el.label.

  2. Addresses GHSA-gh4j-gqv2-49f6; clears npm audit in CI.

@emor emor force-pushed the fix/viewnode-text-from-ui-dump branch from ade9d1c to 168438d Compare April 23, 2026 06:35
identifier: el.identifier || el.name || undefined,
value: el.value || undefined,
text: el.label || undefined,
text: el.text || el.label || undefined,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we must return el.text as it is. if you are expecting a label, you should use .label. it's more deterministic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmegidish fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants